<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>首页</title>
		<link rel="stylesheet" href="__PUBLIC__/Product/css/page_index.css">
		<link rel="stylesheet" href="__PUBLIC__/Product/css/lib/dropload.css">
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Product/css/lib/swiper-3.4.2.min.css" />
		<link rel="stylesheet" href="__PUBLIC__/Product/css/lib/animate.css">
		<script src="__PUBLIC__/Product/js/lib/flexible.js"></script>
		<script src="__PUBLIC__/Product/js/lib/swiper-3.4.2.min.js"></script>
		<style>
			#news_red {
				display: block;
				width: 0.5rem;
				height: 0.35rem;
				background-color: #ff4845;
				border-radius: 0.2rem;
				color: white;
				line-height: 0.36rem;
				font-size: 0.32rem;
				text-align: center;
				position: absolute;
				top: 0rem;
				right: -0.1rem;
			}
		</style>
	</head>
	<body>
		<div class="home_box">
			<!--头部-->
			<div class="home_heard">
				<!--搜索、扫码、消息-->
				<div class="homeHeard_top">
					<div class="top_Lt">
						<img class="search" src="__PUBLIC__/Product/img/serach.png" alt="" />
						<input class="input" type="text" placeholder="搜索商品或物品" id="search" />
					</div>
					<div class="top_Rt">
						<img class="saosao" src="__PUBLIC__/Product/img/saosao.png" onclick="a()"></img>
						<img class="news" src="__PUBLIC__/Product/img/news.png" />
						<span id="news_red"></span>
					</div>
				</div>
				<!-- 轮播图 -->
				<div class="swiper-container">
					<div class="swiper-wrapper">
						<!--<div class="swiper-slide">
	                        <img src="__PUBLIC__/Product/img/1.jpg" alt="">
	                    </div>
	                    <div class="swiper-slide">
	                        <img src="__PUBLIC__/Product/img/2.jpg" alt="">
	                    </div>
	                    <div class="swiper-slide">
	                        <img src="__PUBLIC__/Product/img/3.jpg" alt="">
	                    </div>
	                    <div class="swiper-slide">
	                        <img src="__PUBLIC__/Product/img/4.jpg" alt="">
	                    </div>
	                    <div class="swiper-slide">
	                        <img src="__PUBLIC__/Product/img/5.jpg" alt="">
	                    </div>-->
					</div>
					<!-- 分页器 -->
					<div class="swiper-pagination"></div>
				</div>
			</div>
			<!--内容-->
			<div class="home_content">
				<div class="tableBar">
					<div class="Market">
						<img src="__PUBLIC__/Product/img/shngcheng.png" />
						<p>集分商城</p>
					</div>
					<div class="exchange">
						<img src="__PUBLIC__/Product/img/duihuan.png" />
						<p>集分兑换</p>
					</div>
					<div class="manage">
						<img src="__PUBLIC__/Product/img/licai.png" />
						<p>集分理财</p>
					</div>
					<div class="game">
						<img src="__PUBLIC__/Product/img/game.png" />
						<p>集分游戏</p>
					</div>
				</div>
				<!--零元购-->
				<div class="freeBuy">
					<p class="twoSpan">
						<!--<span>购</span>-->
						<img src="__PUBLIC__/Product/img/buy.png"/>
						<span>零元购</span>
					</p>
					<div class="fImgBox">
						<img src="__PUBLIC__/Product/img/ad.png" />
					</div>
				</div>
				<!--精选专题-->
				<div class="selected">
					<div class="twoSpan">
						<div>
							<img src="__PUBLIC__/Product/img/star_pur.png"/>
							<span>精选专题</span>
						</div>
						<div>
							<span class="lookMore">查看更多</span>
							<img src="__PUBLIC__/Product/img/zuobiao.png" alt="" />
						</div>
					</div>
					<div class="slide_x">
						<div class="roll_x">
							<!-- <div class="sld">
								<input type="hidden" value="121212"/>
								<img class="IMG" src="__PUBLIC__/Product/img/11.png"/>
								<div class="arrt">精准、无误</div>
								<p>特殊材料与制造工艺，绝缘</p>
							</div>
							<div class="sld">
								<input type="hidden" value="242424"/>
								<img class="IMG" src="__PUBLIC__/Product/img/11.png"/>
								<div class="arrt">精准、无误</div>
								<p>特殊材料与制造工艺，绝缘</p>
							</div>
							<div class="sld">
								<input type="hidden" value="353535"/>
								<img class="IMG" src="__PUBLIC__/Product/img/11.png"/>
								<div class="arrt">精准、无误</div>
								<p>特殊材料与制造工艺，绝缘</p>
							</div>
							<div class="sld">
								<input type="hidden" value="464646"/>
								<img class="IMG" src="__PUBLIC__/Product/img/11.png"/>
								<div class="arrt">精准、无误</div>
								<p>特殊材料与制造工艺，绝缘</p>
							</div>
							<div class="sld">
								<input type="hidden" value="575757"/>
								<img class="IMG" src="__PUBLIC__/Product/img/11.png"/>
								<div class="arrt">精准、无误</div>
								<p>特殊材料与制造工艺，绝缘</p>
							</div> -->
						</div>
					</div>
				</div>
				<!--广告-->
				<div class="advment">
					<img src="__PUBLIC__/Product/img/guanggao.png" />
					<div class="newMan">新人专享</div>
					<div class="slogan">方寸之间，尽显精致</div>
				</div>
				<!--猜你喜欢-->
				<div class="slow_choseBox">
					<img src="__PUBLIC__/Product/img/gass.png"/>
					<!--<div class="slow_choseCon">
						<span class="blank"></span>
						<span class="squire">◆</span>
						<span class="heart"><img src="__PUBLIC__/Product/img/heart.png" alt="">&nbsp;猜你喜欢</span>
						<span class="squire">◆</span>
						<span class="blank"></span>
					</div>-->
				</div>
				<!--商品列表-->
				<div class="jfGoodsList_box">
					<div class="list_row" id="wrapper">
						<!-- <div class="list_col">
	            			<input type="hidden" value="111111"/>
	            			<img src="__PUBLIC__/Product/img/luyouqi.png"/>
	            			<p class="good_tit"><span class="redBg">精选</span>麻花藤最新变频路由器穿墙穿门信号强</p>
	            			<div class="priceORjf">
	            				<p>
	            					<span class="newPrice">&yen;99</span>
	            					<span class="oldPrice">&yen;199.8</span>
	            				</p>
	            			</div>
	            		</div>
	            		<div class="list_col">
	            			<input type="hidden" value="222222"/>
	            			<img src="__PUBLIC__/Product/img/luyouqi.png"/>
	            			<p class="good_tit"><span class="redBg">HOT</span>麻花藤最新变频路由器穿墙穿门信号强</p>
	            			<div class="priceORjf">
	            				<p>
	            					<span class="newPrice">&yen;99</span>
	            					<span class="oldPrice">&yen;199.8</span>
	            				</p>
	            			</div>
	            		</div>
	            		<div class="list_col">
	            			<input type="hidden" value="333333"/>
	            			<img src="__PUBLIC__/Product/img/luyouqi.png"/>
	            			<p class="good_tit"><span class="redBg">HOT</span>麻花藤最新变频路由器穿墙穿门信号强</p>
	            			<div class="priceORjf">
	            				<p>
	            					<span class="newPrice">&yen;99</span>
	            					<span class="oldPrice">&yen;199.8</span>
	            				</p>
	            			</div>
	            		</div>
	            		<div class="list_col">
	            			<input type="hidden" value="444444"/>
	            			<img src="__PUBLIC__/Product/img/luyouqi.png"/>
	            			<p class="good_tit"><span class="redBg">精选</span>麻花藤最新变频路由器穿墙穿门信号强</p>
	            			<div class="priceORjf">
	            				<p>
	            					<span class="newPrice">&yen;99</span>
	            					<span class="oldPrice">&yen;199.8</span>
	            				</p>
	            			</div>
	            		</div>
	            		<div class="list_col">
	            			<input type="hidden" value="555555"/>
	            			<img src="__PUBLIC__/Product/img/luyouqi.png"/>
	            			<p class="good_tit"><span class="redBg">HOT</span>麻花藤最新变频路由器穿墙穿门信号强</p>
	            			<div class="priceORjf">
	            				<p>
	            					<span class="newPrice">&yen;99</span>
	            					<span class="oldPrice">&yen;199.8</span>
	            				</p>
	            			</div>
	            		</div> -->
					</div>
            		<!--无数据-->
					<div id="noData" class="noData">我也是有深度的...</div>
				</div>
			</div>
			<!--底部-->
			<div class="home_foot">
				<div class="foot_Lt">
					<img class="oldHome" src="__PUBLIC__/Product/img/home_pur.png" alt="" />
					<p>首页</p>
				</div>
				<div class="foot_Con">
					<img class="oldCar" src="__PUBLIC__/Product/img/shopcar.png" />
					<p>购物车</p>
					<!--<span class="shopingCar_red"><span></span>+</span>-->
				</div>
				<div class="foot_Rt">
					<img class="oldPerson" src="__PUBLIC__/Product/img/ren.png" />
					<p>我的</p>
				</div>
			</div>
			<!--回到顶部-->
			<div class="goTop">
				<img src="__PUBLIC__/Product/img/goTop.png" />
			</div>
		</div>
	</body>
</html>
<script src="__PUBLIC__/Product/js/lib/jquery3.2.1.js"></script>
<script src="__PUBLIC__/Product/js/lib/lazyload.js"></script>
<script src="__PUBLIC__/Product/js/lib/dropload.js"></script>
<script src="__PUBLIC__/Product/js/lib/carousel.js"></script>
<script src="__PUBLIC__/Product/js/page_index.js"></script>
<script>
	$('.Market').bind('click', function() {
		console.log('跳转集分商城...');
		var str = "{:U('Pointshop/point_shop_index')}";
		window.location.href = str;
	});
	$('.exchange').bind('click', function() {
		console.log('跳转集分兑换商城...');
		var str = "{:U('Pointexchange/index')}";
		window.location.href = str;
	});
	$('.manage').bind('click', function() {
		console.log('跳转集分兑换商城...');
		//  	var str = "{:U('Pointexchange/index')}";
		window.location.href = "{:U('Pointshop/point_manage')}";
	});
	$('.foot_Rt').bind('click', function() {
		console.log('跳转我的个人中心...');
		var str = "{:U('User/user')}";
		window.location.href = str;
	});
	$('.freeBuy').bind('click', function() {
		console.log('跳转零元购...');
		var str = "{:U('Zero/Zeroindex')}";
		window.location.href = str;
	});
</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
	wx.config({
		debug: false,
		appId: "{$signPackage['appId']}",
		timestamp: "{$signPackage['timestamp']}",
		nonceStr: "{$signPackage['nonceStr']}",
		signature: "{$signPackage['signature']}",
		jsApiList: [
			'onMenuShareTimeline',
			'onMenuShareAppMessage',
			"onMenuShareQQ",
			"onMenuShareQZone",
			'scanQRCode'
		]
	});
	wx.ready(function() {
		//分享朋友
		wx.onMenuShareAppMessage({
			title: "{$news['Title']}",
			desc: "{$news['Description']}",
			link: "{$news['Url']}",
			imgUrl: "{$news['PicUrl']}",
			type: 'link', //分享类型
			dataUrl: '',
			success: function(res) {
				alert('已分享');
			},
			cancel: function(res) {
				alert('已取消');
			}
		});
		//分享朋友圈
		wx.onMenuShareTimeline({
			title: '集分卡商城',
			link: 'http://a.91jfk.com/Product/Shopindex/index',
			imgUrl: 'http://a.91jfk.com/Public/Product/img/shngcheng.png',
			success: function(res) {
				alert('已分享');
			},
			cancel: function(res) {
				alert('已取消');
			}
		});
		//分享到QQ好友
		wx.onMenuShareQQ({
			title: '集分卡商城', // 分享标题
			desc: '引起1000w+观看的奥运视频，到底发生了什么', // 分享描述
			link: 'http://a.91jfk.com/Product/Shopindex/index', // 分享链接
			imgUrl: 'http://a.91jfk.com/Public/Product/img/shngcheng.png', // 分享图标
			success: function() {
				// 用户确认分享后执行的回调函数
				//	          	alert('已分享');
			},
			cancel: function() {
				// 用户取消分享后执行的回调函数
				//	         	alert('已取消');
			}
		});
		//分享QQ空间
		wx.onMenuShareQZone({
			title: '集分卡商城', // 分享标题
			desc: '集分、理财、游戏、商城', // 分享描述
			link: 'http://a.91jfk.com/Product/Shopindex/index', // 分享链接
			imgUrl: 'http://a.91jfk.com/Public/Product/img/shngcheng.png', // 分享图标
			success: function() {
				// 用户确认分享后执行的回调函数
				//	            alert('已分享');
			},
			cancel: function() {
				// 用户取消分享后执行的回调函数
				alert('已取消');
			}
		});
		//分享到微博
		wx.onMenuShareWeibo({
			title: '集分卡商城', // 分享标题
			desc: '集分、理财、游戏、商城', // 分享描述
			link: 'http://a.91jfk.com/Product/Shopindex/index', // 分享链接
			imgUrl: 'http://a.91jfk.com/Public/Product/img/shngcheng.png', // 分享图标
			success: function() {
				// 用户确认分享后执行的回调函数
				alert('已分享');
			},
			cancel: function() {
				// 用户取消分享后执行的回调函数
				alert('已取消');
			}
		});
	});
	//判断当前客户端版本是否支持分享参数自定义
	wx.checkJsApi({
		jsApiList: [
			'onMenuShareTimeline',
			'onMenuShareAppMessage'
		],
		success: function(res) {
			alert(JSON.stringify(res));
		}
	});
	wx.error(function(res) {
		alert("验证失败");
	});

	function a() {
		wx.scanQRCode({
			needResult: 0, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
			scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码，默认二者都有
			success: function(res) {
				var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
			}
		});
	}

	$(".news").click(function() {
		var str = "{:U('Notice/index')}";
		window.location.href = str;
	});
	//搜索框获取焦点，跳转页面
	$("#search").focus(function() {
		window.location.href = "sousuo.html";
	});
</script>
<script>
	$(function() {
		$.ajax({
			type:"post",
			url:"http://a.91jfk.com/Product/Shopindex/ControlRedCircle",
			dataType:'json',
			success:function(res){
				console.log(res);
				if(res.code == '1' && (res.total - 0) > 0){
					$("#news_red").css("display",'block');
					$("#news_red").text(res.total + "+");
				}else if(res.code == "0"){
					$("#news_red").css("display",'none');
				}
			},
			error:function(err){
				console.log(err)
			}
		});
	});
</script>